home *** CD-ROM | disk | FTP | other *** search
/ Aminet 15 / Aminet 15 - Nov 1996.iso / Aminet / dev / basic / ace24dist.lha / ace24.lha / include / intuition / cgHooks.h next >
C/C++ Source or Header  |  1996-09-10  |  3KB  |  107 lines

  1. #ifndef INTUITION_CGHOOKS_H
  2. #define INTUITION_CGHOOKS_H 1
  3. /*
  4. ** cghooks.h for ACE Basic
  5. **
  6. ** Note: Translated to ACE by ConvertC2ACE
  7. **       @ MapMeadow Software, Nils Sjoholm
  8. **
  9. **
  10. ** Date: 09/01/95
  11. **
  12. **
  13. */
  14.  
  15. /*
  16. ** This are the StructPointer defines for cghooks.h
  17. */
  18. #ifndef GadgetInfoPtr
  19. #define GadgetInfoPtr ADDRESS
  20. #endif
  21. #ifndef PGXPtr
  22. #define PGXPtr ADDRESS
  23. #endif
  24. #ifndef gi_Pens_StructPtr
  25. #define gi_Pens_StructPtr ADDRESS
  26. #endif
  27. /*
  28. ** End of StructPointer defines for cghooks.h
  29. */
  30.  
  31.  
  32. #ifndef EXEC_TYPES_H
  33. #include <exec/types.h>
  34. #endif
  35.  
  36. #ifndef INTUITION_INTUITION_H
  37. #include <intuition/intuition.h>
  38. #endif
  39.  
  40. #ifndef DrawInfoPtr
  41. #define DrawInfoPtr ADDRESS
  42. #endif
  43.  
  44. /*
  45.  * Package of information passed to custom and 'boopsi'
  46.  * gadget "hook" functions.  This structure is READ ONLY.
  47.  */
  48.  
  49. STRUCT gi_Pens_Struct  
  50.     BYTE     DetailPen 
  51.     BYTE     BlockPen 
  52. END STRUCT 
  53.  
  54. STRUCT GadgetInfo  
  55.  
  56.     ScreenPtr  gi_Screen 
  57.     WindowPtr  gi_Window  /* null for screen gadgets */
  58.     RequesterPtr  gi_Requester   /* null if not GTYP_REQGADGET */
  59.  
  60.     /* rendering information:
  61.      * don't use these without cloning/locking.
  62.      * Official way is to call ObtainRPort()
  63.      */
  64.     RastPortPtr  gi_RastPort 
  65.     LayerPtr  gi_Layer 
  66.  
  67.     /* copy of dimensions of screen/window/g00/req(/group)
  68.      * that gadget resides in.  Left/Top of this box is
  69.      * offset from window mouse coordinates to gadget coordinates
  70.      *      screen gadgets:         0, 0 (from screen coords)
  71.      *  window gadgets (no g00):    0, 0
  72.      *  GTYP_GZZGADGETs (borderlayer):      0, 0
  73.      *  GZZ innerlayer gadget:      borderleft,  bordertop
  74.      *  Requester gadgets:      reqleft,  reqtop
  75.      */
  76.     IBox gi_Domain 
  77.  
  78.     /* these are the pens for the window or screen  */
  79.     gi_Pens_Struct gi_Pens 
  80.  
  81.     /* the Detail and Block pens in gi_DrInfo->dri_Pens[] are
  82.      * for the screen.  Use the above for window-sensitive
  83.      * colors.
  84.      */
  85.     DrawInfoPtr  gi_DrInfo 
  86.  
  87.     /* reserved space: this structure is extensible
  88.      * anyway,  but using these saves some recompilation
  89.      */
  90.     STRING gi_Reserved SIZE 24   /* 6*SIZEOF(LONGINT) */
  91. END STRUCT 
  92.  
  93. /*** system private data structure for now ***/
  94. /* prop gadget extra info   */
  95. STRUCT PGX   
  96.     IBox pgx_Container 
  97.     IBox pgx_NewKnob 
  98. END STRUCT 
  99. /* this casts MutualExclude for easy assignment of a hook
  100.  * pointer to the unused MutualExclude field of a custom gadget
  101.  */
  102. /*
  103. #define CUSTOM_HOOK( gadget ) ( (STRUCT Hook *) (gadget)->MutualExclude)
  104. */
  105.  
  106. #endif
  107.